import request from './request'

export function getDeviceList() {
  return request.get('/devices')
}

export function createDevice(data) {
  return request.post('/devices', data)
}

export function updateDevice(id, data) {
  return request.put(`/devices/${id}`, data)
}

export function deleteDevice(id) {
  return request.delete(`/devices/${id}`)
}

export function searchDevices(keyword) {
  return request.get('/devices/search', { params: { keyword } })
} 